// ==========================================================================
// GFast自动生成api操作代码。
// 生成日期：2024-06-18 17:21:41
// 生成路径: api/v1/app/app_news.go
// 生成人：gfast
// desc:文章相关参数
// company:云南奇讯科技有限公司
// ==========================================================================

package app

import (
	"github.com/gogf/gf/v2/frame/g"
	commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
	"github.com/tiger1103/gfast/v3/internal/app/app/model"
)

// AppNewsSearchReq 分页请求参数
type AppNewsSearchReq struct {
	g.Meta `path:"/list" tags:"文章" method:"get" summary:"文章列表"`
	commonApi.Author
	model.AppNewsSearchReq
}

// AppNewsSearchRes 列表返回结果
type AppNewsSearchRes struct {
	g.Meta `mime:"application/json"`
	*model.AppNewsSearchRes
}

// 相关连表查询数据
type LinkedAppNewsDataSearchReq struct {
	g.Meta `path:"/linkedData" tags:"文章" method:"get" summary:"文章关联表数据"`
	commonApi.Author
}

// 相关连表查询数据
type LinkedAppNewsDataSearchRes struct {
	g.Meta `mime:"application/json"`
	*model.LinkedAppNewsDataSearchRes
}

// AppNewsAddReq 添加操作请求参数
type AppNewsAddReq struct {
	g.Meta `path:"/add" tags:"文章" method:"post" summary:"文章添加"`
	commonApi.Author
	*model.AppNewsAddReq
}

// AppNewsAddRes 添加操作返回结果
type AppNewsAddRes struct {
	commonApi.EmptyRes
}

// AppNewsEditReq 修改操作请求参数
type AppNewsEditReq struct {
	g.Meta `path:"/edit" tags:"文章" method:"put" summary:"文章修改"`
	commonApi.Author
	*model.AppNewsEditReq
}

// AppNewsEditRes 修改操作返回结果
type AppNewsEditRes struct {
	commonApi.EmptyRes
}

// AppNewsGetReq 获取一条数据请求
type AppNewsGetReq struct {
	g.Meta `path:"/get" tags:"文章" method:"get" summary:"获取文章信息"`
	commonApi.Author
	Id uint64 `p:"id" v:"required#主键必须"` //通过主键获取
}

// AppNewsGetRes 获取一条数据结果
type AppNewsGetRes struct {
	g.Meta `mime:"application/json"`
	*model.AppNewsInfoRes
}

// AppNewsDeleteReq 删除数据请求
type AppNewsDeleteReq struct {
	g.Meta `path:"/delete" tags:"文章" method:"delete" summary:"删除文章"`
	commonApi.Author
	Ids []uint64 `p:"ids" v:"required#主键必须"` //通过主键删除
}

// AppNewsDeleteRes 删除数据返回
type AppNewsDeleteRes struct {
	commonApi.EmptyRes
}
